package com.wyh.controller.groupfour.proprietor;

import com.wyh.common.result.Result;
import com.wyh.domain.dto.groupfour.myproprietorDTO.ShareInfoDTO;
import com.wyh.domain.vo.gruopfour.myProprietorVO.ShareInfoVO;
import com.wyh.service.appservice.WXShareService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/wx")
@Api(tags = "微信分享接口")
@Slf4j
public class WxShareController {


    @Autowired
    private WXShareService wxShareService;

    @PostMapping("/getShareInfo")
    @ApiOperation("获取分享配置信息 - H5")
    public Result<ShareInfoVO> getShareInfo(@RequestBody ShareInfoDTO shareInfoDTO){
        return Result.success(wxShareService.getWxConfig(shareInfoDTO));
    }

}